package com.utc.cards.player.jade.agent.playerAgent;

import jade.core.AID;
import jade.core.behaviours.OneShotBehaviour;
import jade.lang.acl.ACLMessage;

import com.utc.cards.Constants;

public class SendPlayerActiveBehaviour extends OneShotBehaviour
{

    private static final long serialVersionUID = 3266248988065504762L;
    private PlayerAgent agent;

    public SendPlayerActiveBehaviour(PlayerAgent playerAgent)
    {
        this.agent = playerAgent;
    }

    @Override
    public void action()
    {
        ACLMessage message = new ACLMessage(ACLMessage.INFORM);
        message.setConversationId("active");
        message.addReceiver(new AID(Constants.CARDS_HOST_AGENT_NAME, AID.ISLOCALNAME));
        agent.send(message);
    }

}
